home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 971 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. From: "john (j.d.) hickin" <hickin@bnr.ca>
  2. Message-ID: <4k1s4j$jk0@bmtlh10.bnr.ca>
  3. X-Original-Date: Fri, 5 Apr 1996 01:13:55 +0000
  4. Path: in2.uu.net!bounce-back
  5. Date: 05 Apr 96 03:34:03 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Subject: Re: string::npos is unhandy and dangerous
  8. Newsgroups: comp.std.c++
  9. Organization: Bell Northern Research
  10. X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715)
  11. References: <news:4k06dh$kni@penguin.doc.ic.ac.uk>
  12. X-Url: news:4k06dh$kni@penguin.doc.ic.ac.uk
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBFAgUBMWSU9OEDnX0m9pzZAQGGGgF+PQpF+RgwEu0spEg1GtvNbemO3HatA78g
  15.     OTao4h6iWK1aq62O7NAj6N5xLVJomaMM
  16.     =dV4U
  17.  
  18. The basic problem has been already been noted raised by Mr. Kanze.  Because
  19. the basic_string contains the following declaration:
  20.  
  21.      static const size_type npos = -1;
  22.  
  23. it is evident that there is a constraint that size_type must be something thay
  24. can be constructed from an integral type.  I can't quite recall the wording of
  25. the original post but it was made clear that size_type cannot be arbitrary.
  26.  
  27. -- 
  28. John Hickin      Nortel Technology, Montreal, Quebec
  29. (514) 765-7924   hickin@nortel.ca
  30. ---
  31. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  32. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  33. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  34. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  35. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  36.